ABC166 C - Peaks
https://atcoder.jp/contests/abc166/tasks/abc166_c
提出
code: python
n, m = map(int, input().split())
h = list(map(int, input().split()))
ab =
list(map(int, input().split())) for _ in range(m)
pros =
set() for _ in range(n)
for i in ab:
pros[i
0
-1].add(i
1
)
pros[i
1
-1].add(i
0
)
ans = 0
for i in range(n):
good = True
for j in pros
i
:
if (h
j-1
>= h
i
):
good = False
break
if (good):
ans += 1
print(ans)